package demo.mappers;

import demo.entity.record;
import org.springframework.jdbc.core.RowMapper;



import java.sql.ResultSet;
import java.sql.SQLException;

public class recordRowMapper implements RowMapper<record> {

    @Override
    public record mapRow(ResultSet rs,int i) throws SQLException {
        record rec = new record();
//        rec.setId(rs.getInt("id"));
        rec.setEmp_id(rs.getInt("emp_id"));
        rec.setName(rs.getString("name"));
        rec.setDepartment_id(rs.getString("department_id"));
        rec.setJob_id(rs.getString("job_id"));
        rec.setArrival_time(rs.getString("arrival_time"));
        rec.setDeparture_time(rs.getString("departure_time"));
        rec.setStatus(rs.getString("status"));
//        rec.setDate(rs.getString("date"));
        return rec;
    }
}
